import request from '@/utils/request'


/*TODo 注意,如果是psot请求,不加params  ,get请求需要加上*/

// 退出方法
export function logout() {
  return request({
    url: '/logout',
    method: 'post'
  })
}

// 博客分页
export function blogPage(current,size) {
  let data = {
    "current":current,
    "size":size
  };
  return request({
    url: '/blog/page',
    method: 'get',
    data
  })
}



// 查询发布的博客,类型饼图
export function blogSortPie() {
  return request({
    url: '/blog/blogSortPie',
    method: 'get',
  })
}

// 博客推荐
export function recommendBlog(id) {
  let obj = {
    "blogId":id
  };
  return request({
    url: '/blog/recommendBlog',
    method: 'get',
    params:obj
  })
}

// 博客推荐
export function blogDetail(id) {
  let obj = {
    "id":id
  };
  return request({
    url: '/blog/blogDetail',
    method: 'get',
    params:obj
  })
}



